/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uttt.edu.mx.conexion;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Uriel Huicochea
 */
public class Conexion {
    private Connection con;
    
     public Conexion() {
    }

    public Connection getConexion() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            con = DriverManager.getConnection("jdbc:mysql://localhost:3307/bd_highland", "root", "123456");
            return con;

        } catch (SQLException sqlException) {
            System.out.println(sqlException.getMessage() + "Error en la Base de Datos");
            return null;
        } catch (ClassNotFoundException classNotFound) {
            System.out.println(classNotFound.getMessage() + "Error, No se ha encontrado el Driver");
            return null;
        }

    }
}
